library(ggplot2)
library(dplyr)


setwd("C:\\Users\\dell\\Desktop\\")
data <- read.csv("test01.csv",header = T)


ggplot(data, aes(x=data$dis, colour = data$Group, fill=data$Group)) +
  geom_density(lwd = 0.8, linetype = 1, alpha=0.5) +
  xlim(0, 1) + 
  theme_bw() + 
  theme(axis.text.x=element_text(angle=0, hjust = 0.5,colour="black",family="Arial",size=14), #设置x轴刻度标签的字体显示倾斜角度为15度，并向下调整1(hjust = 1)，字体簇为Times大小为20
        axis.text.y=element_text(family="Arial",size=14,face="plain"), #设置y轴刻度标签的字体簇，字体大小，字体样式为plain
        axis.title.y=element_text(family="Arial",size = 14,face="plain"), #设置y轴标题的字体属性
        axis.line = element_line(colour = "black"), #去除默认填充的灰色，并将x=0轴和y=0轴加粗显示(size=1)
        
        legend.text=element_text(family="Arial", colour="black",  #设置图例的子标题的字体属性#face="italic", 
                                 size=14),
        legend.title=element_blank(),
        #        legend.title=element_text(family="Arial", colour="black", #设置图例的总标题的字体属性#face="italic", 
        #                                  size=18),
        panel.grid.major = element_blank(),   #不显示网格线
        panel.grid.minor = element_blank()) +  #不显示网格线
  ylab("") +
  xlab("") #设置x轴和y轴的标题
